{% load i18n %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}" xml:lang="{{ LANGUAGE_CODE }}" lang="{{ LANGUAGE_CODE }}">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title>{% block head_title_base %}{% if SITE_NAME %}{{ SITE_NAME }} : {% endif %}{% block head_title %}{% endblock %}{% endblock %}</title>
        <!--[if IE]><style>
            div {
                zoom: 1; /* trigger hasLayout */
            }
        </style><![endif]-->
        <link rel="stylesheet" href="{{ STATIC_URL }}pinax/css/base.css" />
        <link rel="stylesheet" href="{{ STATIC_URL }}pinax/css/tabs.css" />
        <link rel="stylesheet" href="{{ STATIC_URL }}pinax/css/facebox.css" />
        <link rel="stylesheet" href="{{ STATIC_URL }}pinax/css/announcements.css" />
        <link rel="stylesheet" href="{{ STATIC_URL }}pinax/css/accounts.css" />
        <link rel="stylesheet" href="{{ STATIC_URL }}uni_form/uni-form.css" />
        {% if LANGUAGE_BIDI %}
        <style type="text/css" media="screen">
            div.right_panel {
                float: left; /* hotfix for sidebar */
            }
        </style>
        {% endif %}
        {% block head_base_js%}
            <script src="{% block jquery_src %}{{ STATIC_URL }}pinax/js/jquery-1.4.3.min.js{% endblock %}" type="text/javascript"></script>
            {% block extra_head_js %}{% endblock %}
        {% endblock%}
        {% block extra_head_base %}
            {% block extra_head %}{% endblock %}
        {% endblock %}
    </head>
    
    <body class="{% block body_class %}{% endblock %}">
        {% if site_wide_announcements %}
            <div id="site_wide_announcements">
                <ul>
                    {% for announcement in site_wide_announcements %}
                    <li>
                        <a href="{{ announcement.get_absolute_url }}">{{ announcement }}</a> -
                        <a href="{% url announcement_hide announcement.pk %}?next={{ request.path }}">{% trans "Hide announcement" %}</a>
                    </li>
                    {% endfor %}
                </ul>
            </div>
        {% endif %}
        
        <div id="tabhead">
            <div class="logo" dir="ltr">{% block logo_link_image %}{% endblock %}</div>
            <div class="login">{% block login %}{% endblock %}{% block locale_switcher %}{% endblock %}<div style="text-align: right;"></div></div>
            <div id="left_tabs" >{% block left_tabs %}{% endblock %}</div>
            <div id="right_tabs" >{% block right_tabs %}{% endblock %}</div>
        </div>
        <div id="subnav" class="clearfix">{% block subnav_base %}<div class="clearfix">{% block subnav %}&nbsp;{% endblock %}</div>{% endblock %}</div>
        
        {% block body_outer %}
        <div id="body">
            {% if messages %}
                <ul id="messages">
                    {% for message in messages %}
                    <li id="message_{{ forloop.counter }}"{% if message.tags %} class="{{ message.tags }}"{% endif %}>
                        <a href="#"><small>{% trans "clear" %}</small></a>
                        {{ message }}
                    </li>
                    {% endfor %}
                </ul>
            {% endif %}
            
            {% block body %}
            {% endblock %}
            
        </div>
        {% endblock %}
        
        <div id="footer">{% block footer %}{% endblock %}</div>
        <script src="{{ STATIC_URL }}pinax/js/base.js" type="text/javascript"></script>
        <script src="{{ STATIC_URL }}uni_form/uni-form.jquery.js" type="text/javascript"></script>
        {% include "facebox_js.html" %}
        {% block extra_body_base %}
            {% block extra_body %}{% endblock %}
        {% endblock %}
    </body>
</html>
